package kassiopeia.commons.model.task;

import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("connection")
public final class Connection implements Serializable {

    private static final long serialVersionUID = -2945990696908486239L;

    private String fromPlugin;

    private String fromPluginOutput;

    private String toPlugin;

    public Connection() {}

    public Connection(String fromPlugin, String fromPluginOutput, String toPlugin) {
        this.fromPlugin = fromPlugin;
        this.fromPluginOutput = fromPluginOutput;
        this.toPlugin = toPlugin;
    }

    public String getFromPluginOutput() {
        return fromPluginOutput;
    }

    public void setFromPluginOutput(String fromPluginOutput) {
        this.fromPluginOutput = fromPluginOutput;
    }

    public String getFromPlugin() {
        return fromPlugin;
    }

    public void setFromPlugin(String fromPlugin) {
        this.fromPlugin = fromPlugin;
    }

    public String getToPlugin() {
        return toPlugin;
    }

    public void setToPlugin(String toPlugin) {
        this.toPlugin = toPlugin;
    }

    @Override
    public String toString() {
        return "[Connection: " + "fromPlugin=" + fromPlugin + ", fromPluginOutput=" + fromPluginOutput + ", toPlugin=" + toPlugin + "]";
    }
}
